package com.ssy.common;

/**
 * CodeMsg
 *
 * @author ssy
 * @date 2020/11/11
 **/
public enum CodeMsg {
    USER_ALREADY_EXISTS(500, "用户名已存在"),
    INVALID_STUDENT_NUMBER(1005, "无效学号"),
    STUDENT_NUMBER_ALREADY_EXISTS(1006, "学号已存在"),
    COURSE_NUMBER_ALREADY_EXISTS(1006, "课程号已存在"),
    COURSE_NAME_ALREADY_EXISTS(1006, "课程名称已存在"),
    CLASS_NUMBER_ALREADY_EXISTS(1006, "班级号已存在"),
    CLASS_NAME_ALREADY_EXISTS(1006, "班级名称已存在"),
    STUDENT_PHONE_ALREADY_EXISTS(1006, "该手机号已存在"),
    USER_CHECK_CODE_ERROR(1001, "验证码不正确"),
    USER_SESSION_INVALI_ERROR(1003, "用户登录失效"),
    USER_UPDATE_PWD_ERROR(1002, "当前密码不正确"),
    USER_LOGIN_ERROR(1002, "账户或密码不正确"),
    REST_USER_PWD_SUCCES(200, "密码已重置"),
    REST_USER_PWD__ERROR(500, "重置密码失败"),
    UPDATE_SUCCES(200, "修改成功"),
    UPDATE_ERROR(500, "修改失败"),
    DELETE_SUCCES(200, "删除成功"),
    DELETE_ERROR(500, "删除失败"),
    ADD_SUCCES(200, "添加成功"),
    ADD_SCORE_ERROR(500, "该学生没有这门课程"),
    ADD_SCORE_EXISTS_ERROR(500, "该学生课程已有成绩"),
    ADD_ERROR(500, "添加失败"),
    SUCCES(200, "操作成功");
    private Integer code;
    private String msg;

    CodeMsg() {
    }

    CodeMsg(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
